

class Student1 extends Preson{

    public Student1(String name) {
        super(name);
        System.out.println("子类构造方法");
    }
}
public class Preson {
    String name;

    public Preson(String name) {
        this.name = name;
        System.out.println("父类构造方法");
    }

    public static void main(String[] args) {
        Preson preson=new Student1("wzj");
    }
}
